function EmulatorManager() {

}

EmulatorManager.emulators = new Array();
EmulatorManager.currentEmulator = null;
EmulatorManager.getEmulatorObj = function(id) {
	var size = EmulatorManager.emulators.length;
	for (var i = 0; i < size; i++) {
		if (EmulatorManager.emulators[i].id == id) {
			return EmulatorManager.emulators[i];
		} else {
			continue;
		}
	}
};
EmulatorManager.removeEmulatorObj = function(id) {
	var size = EmulatorManager.emulators.length;
	var index;
	for (var i = 0; i < size; i++) {
		if (EmulatorManager.emulators[i].id == id) {
			index = i;
			break;
		}
	}
	for (var i = index; i < size - 1; i++) {
		EmulatorManager.emulators[i] = EmulatorManager.emulators[i + 1];
	}
	EmulatorManager.emulators[size-1]=null;
	EmulatorManager.emulators.length-=1;
};
EmulatorManager.checkExists = function(emulatorId) {
	var exists = false;
	var size = EmulatorManager.emulators.length;
	for (var i = 0; i < size; i++) {
		if (EmulatorManager.emulators[i].id == emulatorId) {
			exists = true;
			break;
		}
	}
	return exists;
};
